package com.car.carsharing.mapper;

import com.car.carsharing.pojo.Car;
import com.car.carsharing.pojo.Pay;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PayMapper {
    int insertDriving(Pay p);

    Car selectUseCar(Pay p);

    Pay selectPayByUserIdWithCarId(@Param("userId") Integer userId, @Param("carId") Integer carId);

    int updatePay(Pay pay);

    Pay selectPayByUserId(@Param("userId") Integer userId);


    List<Pay> selectPayedByUserId(@Param("userId") Integer userId);
}
